Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WRR-11077: Fixed Scroller to prevent the native scrolling behavior caused by keydown events when the popup is opened #1756

Merged
merged 9 commits into from
Dec 5, 2024

Conversation

juwonjeong
Copy link
Contributor

@juwonjeong juwonjeong commented Nov 25, 2024

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

When the Scroller has a button that opens FixedPopupPanel. The issue is that when press the down key at the moment the popup is opened the scroller behind the FixedPopupPanel scrolls down.

Resolution

To fix this issue, we have to prevent the native scrolling behavior caused by keydown events.
I created preventScroll function which call preventDefault when a keydown event is caused by a directional key and the spotlight is paused.
I added this preventScroll function to useThemeScroll so that it can be passed to ui/Scroller and used as prop.

Also I added the issue case in Scroller qa-sampler

Additional Considerations

Links

WRR-11077

Comments

…ixedPopupPanels

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.96%. Comparing base (313bc48) to head (d767bc4).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
useScroll/useScroll.js 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1756      +/-   ##
===========================================
+ Coverage    80.89%   80.96%   +0.07%     
===========================================
  Files          148      148              
  Lines         6672     6709      +37     
  Branches      1988     2005      +17     
===========================================
+ Hits          5397     5432      +35     
- Misses         967      969       +2     
  Partials       308      308              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
@MikyungKim MikyungKim changed the title WRR-11077: Added Scroller qa-sampler for case where it is used with FixedPopupPanels WRR-11077: Fixed Scroller to prevent the native scrolling behavior caused by keydown events when the popup is opened Dec 3, 2024
@MikyungKim
Copy link
Contributor

Please resolve the merge conflict.

.travis.yml Outdated
@@ -16,7 +16,7 @@ install:
- npm install
- npm link
- popd
- git clone --branch=develop --depth 1 https://github.com/enactjs/enact ../enact
- git clone --branch=feature/WRR-11077 --depth 1 https://github.com/enactjs/enact ../enact
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to revert the change before merging.

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
Copy link
Contributor

@MikyungKim MikyungKim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
@SkylerBaek SkylerBaek merged commit 2ae1394 into develop Dec 5, 2024
6 of 7 checks passed
@SkylerBaek SkylerBaek deleted the feature/WRR-11077 branch December 5, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants